﻿using System.Windows.Controls;

using EMan.Common.DependencyInjection;
using EMan.Interface.EnterpriseStructure.Jobs;

using TrueCode.Core.Aspects;

namespace EMan.GUI.EditStructure
{
  /// <summary>
  /// Interaction logic for JobListEditorView.xaml
  /// </summary>
  public partial class JobListEditorView : IJobListEditorView
  {
    public JobListEditorView( [NotNull] IFactory factory, [NotNull] IJobListEditorPresenter presenter ) : base( factory, presenter )
    {
      InitializeComponent();
    }

    private void OnListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
      Presenter.SelectedItem = (JobEditable)_listbox.SelectedItem;
    }
  }
}